#!/usr/bin/python

# paintevent.py

import wx

class PaintEvent(wx.Frame):
    def __init__(self, parent, id, title):
        wx.Frame.__init__(self, parent, id, title)

        self.Bind(wx.EVT_PAINT, self.OnPaint)
        self.Centre()

    def OnPaint(self, event):
        wx.Bell()

class MyApp(wx.App):
    def OnInit(self):
        pe = PaintEvent(None, -1, 'paintevent.py')
        pe.Show(True)
        return True

app = MyApp(0)
app.MainLoop()

